import pandas as pd


def excel_one_line_to_list(pathname,usecols):
    '''
    列抽取并存成列表
    :param pathname:
    :param usecols:
    :return:
    '''
    df = pd.read_excel(pathname, usecols=usecols,
                       names=None)  # 读取项目名称列,不要列名
    df_li = df.values.tolist()
    result = []
    for s_li in df_li:
        question = s_li[0]
        if isinstance(question, str):
            question = question.replace(" ", "")
            result.append(question)
    return result

